<h1 align="center">Power By Myxf</h1>
<a href="/index/index/add/">增加</a>
<table>
	<thead>
		<tr>
			<td width="100px">留言ID</td>
			<td width="100px">留言姓名</td>
			<td>留言内容</td>
			<td colspan="2" align="center">操作</td>
		</tr>
	</thead>
	<tbody>
{foreach from=$lists item=one}
		<tr>
			<td id="id{$one.id}">{$one.id}</td>
			<td id="name{$one.id}">{$one.name}</td>
			<td>{$one.content}</td>
			<td width="100px"><a href="/index/index/edit/id/{$one.id}" id="edit{$one.id}">编辑</a></td>
			<td width="100px"><a href="#" id="dele{$one.id}">删除</a><div id="dele-status{$one.id}"></div></td>
		</tr>
{/foreach}
	</tbody>
</table>
{if $pager}
{$pager}
{/if}
<div id="msg_edit"></div>
<script type="text/javascript">
<!--
{foreach from=$lists item=one}
			$("#dele{$one.id}").click(function(){
				var name = $("#name{$one.id}").text();
				var juage = confirm("您确定要删除"+"["+name+"]"+"吗？");
				if(juage == true){
					var id = $("#id{$one.id}").text();
					$.ajax({
						type : "post",
						url : "/index/index/dele/id/"+id,
						dateType : "html",
						success : function(data){
							$("#dele-status{$one.id}").html(data);
							alert(data);
							location.href="/";
						}
					});
				}else{

				}
			});
{/foreach}
//-->
</script>
